<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加专业</title>
    <link rel="stylesheet" href="/styles/student.css">
</head>
<body>
    <header>
        <div>
            <div>
                <i>📚</i>
                <h1>教育查询系统 - 添加专业</h1>
            </div>
        </div>
    </header>

    <div class="form-container">
        <h2>添加新专业</h2>

        {{if .Error}}
        <div class="error-message">{{.Error}}</div>
        {{end}}

        <form action="/addmajor" method="POST">
            <div class="form-group">
                <label for="major_id">专业ID:</label>
                <input type="number" id="major_id" name="major_id" required>
            </div>

            <div class="form-group">
                <label for="name">专业名称:</label>
                <input type="text" id="name" name="name" required>
            </div>

            <button type="submit">添加专业</button>
        </form>
    </div>
    <form action="/major" method="GET">
        <button type="submit" class="add-button">返回专业列表</button>
    </form>
</body>
</html>